package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.OrderVerificationWay;
import com.rockcent.mall.lib.domain.enumclass.TerminalType;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Created by DK on 16/10/23.
 */
@Entity
@Table(name = "merchant_coupon_verification")
@DynamicInsert
@DynamicUpdate
public class MerchantCouponVerification extends IDEntityMall {

    @Column(columnDefinition = "varchar(100) comment '客户ID'")
    private Long customerId;

    @Column(columnDefinition = "bigint comment '数量'")
    private Long num;

    @Column(columnDefinition = "DECIMAL(30,10) comment '总价'")
    private BigDecimal couponPrice;

    @Column(columnDefinition = "bigint comment '商家ID'")
    private Long merchantId;

    @Column(columnDefinition = "bigint comment '平台ID'")
    private Long mallId;

    @Column(columnDefinition = "varchar(100) comment '渠道'")
    private String channel;

    @Column(columnDefinition = "varchar(30) comment '终端类型'")
    @Enumerated(EnumType.STRING)
    private TerminalType terminalType = TerminalType.WECHAT;

    @Column(columnDefinition = "bigint comment '卡卷ID'")
    private Long couponId;

    @Column(columnDefinition = "bigint comment '客户名称'")
    private String customerName;

    @Column(columnDefinition = "varchar(30) comment '核销类型'")
    @Enumerated(EnumType.STRING)
    private OrderVerificationWay verificationWay;

    @Column(columnDefinition = "bigint comment '核销员工ID'")
    private Long verifierId;

    @Column(columnDefinition = "bigint comment '核销门店ID'")
    private Long merchantStoreId;

    @Column(columnDefinition = "varchar(100) comment '核销门店名称'")
    private String merchantStoreName;

    public Long getNum() {
        return num;
    }

    public void setNum(Long num) {
        this.num = num;
    }

    public BigDecimal getCouponPrice() {
        return couponPrice;
    }

    public void setCouponPrice(BigDecimal couponPrice) {
        this.couponPrice = couponPrice;
    }

    public Long getMerchantId() {
        return merchantId;
    }


    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public TerminalType getTerminalType() {
        return terminalType;
    }

    public void setTerminalType(TerminalType terminalType) {
        this.terminalType = terminalType;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public OrderVerificationWay getVerificationWay() {
        return verificationWay;
    }

    public void setVerificationWay(OrderVerificationWay verificationWay) {
        this.verificationWay = verificationWay;
    }

    public Long getVerifierId() {
        return verifierId;
    }

    public void setVerifierId(Long verifierId) {
        this.verifierId = verifierId;
    }

    public Long getMerchantStoreId() {
        return merchantStoreId;
    }

    public void setMerchantStoreId(Long merchantStoreId) {
        this.merchantStoreId = merchantStoreId;
    }

    public String getMerchantStoreName() {
        return merchantStoreName;
    }

    public void setMerchantStoreName(String merchantStoreName) {
        this.merchantStoreName = merchantStoreName;
    }

    @Override
    public String toString() {
        return "MerchantCouponVerification{" +
                "id=" + id +
                ", customerId=" + customerId +
                ", num=" + num +
                ", dateCreated=" + dateCreated +
                ", couponPrice=" + couponPrice +
                ", lastUpdated=" + lastUpdated +
                ", merchantId=" + merchantId +
                ", mallId=" + mallId +
                ", isDelete=" + isDelete +
                ", channel='" + channel + '\'' +
                ", version=" + version +
                ", terminalType=" + terminalType +
                ", couponId=" + couponId +
                ", customerName='" + customerName + '\'' +
                ", verificationWay=" + verificationWay +
                ", verifierId=" + verifierId +
                ", merchantStoreId=" + merchantStoreId +
                ", merchantStoreName='" + merchantStoreName + '\'' +
                '}';
    }
}
